@echo on

set ANDROID_NDK=%~1
set CMAKE_TOOLCHAIN_FILE=%~2
set MAKE_MAKE_PROGRAM=%~3


echo %ANDROID_NDK%
echo %CMAKE_TOOLCHAIN_FILE%
echo %MAKE_MAKE_PROGRAM%


@REM mkdir armv7a
@REM cd armv7a
@REM cmake .. -DANDROID_ABI=armeabi-v7a  -DANDROID_PLATFORM=android-21  -DANDROID_NDK=%ANDROID_NDK% -DCMAKE_TOOLCHAIN_FILE=%CMAKE_TOOLCHAIN_FILE% -G Ninja -DCMAKE_MAKE_PROGRAM=%MAKE_MAKE_PROGRAM%  -DCMAKE_BUILD_TYPE=Release -DANDROID_STL=c++_static 
@REM cmake --build . --target install
@REM cd ..
@REM rd /s /q armv7a

mkdir armv8a
cd armv8a
cmake .. -DANDROID_ABI=arm64-v8a  -DANDROID_PLATFORM=android-21  -DANDROID_NDK=%ANDROID_NDK% -DCMAKE_TOOLCHAIN_FILE=%CMAKE_TOOLCHAIN_FILE% -G Ninja -DCMAKE_MAKE_PROGRAM=%MAKE_MAKE_PROGRAM%  -DCMAKE_BUILD_TYPE=Release -DANDROID_STL=c++_shared 
cmake --build . --target install
cd ..
rd /s /q armv8a